package algorithm.斐波那契数;

import io.swagger.models.auth.In;

import java.util.Arrays;

public class Solution {

    public static void main(String[] args) {
        int max = 10;
        Integer[] arr = new Integer[max];
        arr[0] = 0;
        arr[1] = 1;
        for (int i = 2; i < max; i++) {
            arr[i] = arr[i - 1] + arr[i - 2];
        }
        Arrays.asList(arr).stream().map(i -> i + " ").forEach(i -> System.out.print(i));
    }

}
